package file_demo1;

import java.io.File;
import java.io.IOException;

public class demo2 {
    public static void main(String[] args) throws IOException {
        File f = new File("D://aaa.text");
//        f.mkdirs();
//
//        boolean b = f.createNewFile();
        File[] file  = f.listFiles();
        for (File file1 : file) {
            if(file1.getName().endsWith(".avi") && file1.isFile())
                System.out.println(file1);
        }

    }
}
